<%@ page pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ taglib uri="http://www.ld.com/shield/tags" prefix="shield"%>
<%@ taglib uri="http://www.ld.com/system/tags" prefix="system"%>
<%-- 权限判断 --%>
<shield:permssion type="button">
<div class="contentBody">
	<table class="tab-show">
		<col width="20%">
		<col width="80%">
		<caption>&nbsp;&nbsp;Java VM （Java虚拟机）内存信息</caption>
		<tr>
			<td title="已经使用的内容"><label>已用内存：</label></td>
			<td>${usedMemory } MB</td>
		</tr>
		<tr>
			<td title="已经分配的内容总量"><label>内存总量：</label></td>
			<td>${totalMemory } MB</td>
		</tr>
		<tr>
			<td title="分配的最大内存"><label>最大内存：</label></td>
			<td>${maxMemory } MB</td>
		</tr>
		<tr>
			<td><label>处理器数：</label></td>
			<td>${availableProcessors } 个</td>
		</tr>
		<tr>
			<td><label>线程数：</label></td>
			<td>${totalThread } </td>
		</tr>
		<tr>
			<td colspan="2" style="padding: 0px;">
				<table class="cachetable">
					<tr>
						<td>
							<table border="1" width="100%" class="">
								<tr>
								<c:forEach var="d" begin="1" end="${num_blocks }" varStatus="var">
									<c:choose>
										<c:when test="${(var.index*(100/num_blocks)) < free }">
											<td bgcolor="#00ff00" width="${100/num_blocks }%" style="padding: 0px 5px;"><span style="height:30px; display: inline-block;"></span><%-- <img src="${pageContext.request.contextPath}/images/blank.gif" width="0" height="30" border="0"> --%></td>
										</c:when>
										<c:otherwise>
											<td bgcolor="#006600" width="${100/num_blocks }%" style="padding: 0px 5px;"><span style="height:30px; display: inline-block;"></span><%-- <img src="${pageContext.request.contextPath}/images/blank.gif" width="0" height="30" border="0"> --%></td>
										</c:otherwise>
									</c:choose>
								</c:forEach>
								</tr>
							</table>
						</td>
						<td>
							<font> &nbsp;<b>${percentFree }% 空闲</b> </font>
						</td>
					</tr>
				</table>
			</td>
		</tr>		
	</table>
	<div style="margin-top:10px;" align="center">
		<!-- href 改为data-url -->
		<input class="cache shieldAjax button" data-url="${ctxPathA }/system/jvm/gc" type="button" value="垃圾收集">
		<input class="shieldRefresh button" type="button" value="刷新">
	</div>
	<table class="tab-show">
		<col width="20%">
		<col width="80%">
		<caption>&nbsp;&nbsp;物理内存信息</caption>
		<tr>
			<td><label>可用内存：</label></td>
			<td>${physicalFree } MB</td>
		</tr>
		<tr>
			<td><label>内存总量：</label></td>
			<td>${physicalTotal } MB</td>
		</tr>
		<tr>
			<td><label>可用Swap：</label></td>
			<td>${swapFree } MB</td>
		</tr>
		<tr>
			<td><label>Swap总量：</label></td>
			<td>${swapTotal } MB</td>
		</tr>
	</table>
	<table class="tab-show">
		<col width="20%">
		<col width="80%">
		<caption>&nbsp;&nbsp;系统信息</caption>
		<tr>
			<td><label>操作系统：</label></td>
			<td>${os }</td>
		</tr>
		<tr>
			<td><label>运行版本：</label></td>
			<td>${runtimeVersion }</td>
		</tr>
		<tr>
			<td><label>线程数：</label></td>
			<td>${totalThread }</td>
		</tr>
	</table>
</div>
</shield:permssion>

